<div class="avatar-container" (click)="showAvatarModal()">
    <div *ngIf="!input.value">
        <i class="upload-icon" nz-icon nzType="plus" nzTheme="outline"></i>
        <div>请选择</div>
    </div>
    <img *ngIf="input.value" [src]="getImgUrl(input.value)">
</div>
<input #input style="display:none"/>

<ng-template #avatarSelectTpl>
    <div *ngFor="let av of avatarList" class="avatar-select" (click)="setSelectedAvatar(av)"
        [ngClass]="{'avatar-selected': av==selectedAvatar}">
        <img [src]="getImgUrl(av)">
    </div>
</ng-template>

<ng-template #avatarFooterTpl>
    <button class="confirmBtn" (click)="confirm()">
        确定
    </button>
</ng-template>